﻿using System.Collections.Generic;
using MySql.Data.MySqlClient;
using iRealtor.Maps.DataAccess.Models;

namespace iRealtor.Maps.DataAccess.Dao
{
	public interface IDao
	{
		void Save<TEntity>(TEntity entity) where TEntity : Entity;
		TEntity Load<TEntity>(object key) where TEntity : Entity;
		void BeginTransaction();
		void CommitTransaction();
		void RollbackTransaction();

		//TODO: out from interface when full LINQ is ready
		IList<TEntity> Load<TEntity>(MySqlCommand selectCommand) where TEntity : Entity;
		void ExecuteNonQuery(MySqlCommand command);
	}
}
